home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
Sunp3_450.pxl
< prev
next >
Wrap
Text File
|
2001-07-03
|
11KB
|
392 lines
Initialize:
SetColorPalette(GENERATE)
WinGetActive(Win$)
UseCoordinates(PIXEL)
UseBackGround(TRANSPARENT,0,0,0)
InfoMenu(REMOVE)
WaitInput(300) {let NT and 95 catch up}
SetMenu()
DrawBackGround
WinLocate(Win$,200,200,720,550,Res)
SetCtrlMouse(0,0,400,300,Leave_1,X,Y)
SetMouse(0,0,400,300,Test,X,Y)
SetRightMouse(0,0,400,300,About,X,Y)
Title$ = "Supernova"
WinTitle(Win$, Title$)
GetCPUINfo(CPUtype,Num,Speed,SerNoLo,SerNoHi)
If CPUtype = 586
GoFast = 0
Else
GoFast = 1
Endif
UseFont("Arial",9,19,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(80,60,"Click left mouse for the Show...")
DrawText(80,80,"Click right mouse for information...")
DrawText(80,100,"Click control-left mouse to quit...")
Str(CPUtype,CPUtype$)
CPUtype$ = "CPU type " + CPUtype$ + " detected."
UseFont("Arial",7,15,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(80,140,CPUtype$)
Wait_for_Input:
WaitInput()
About:
AboutUser("Supernova program", "Sample program written with PiXCL",
"This program draws a dynamic window showing the
animation capabilities of PiXCL. The Supernova
image is ⌐ 1996-2001 VYSOR Integration Inc.")
Goto Wait_for_Input
Test: SetMouse() SetRightMouse()
DrawBackGround
WAVPlaySound("galaxy.wav",ASYNC,FILENAME,Res)
If Res= 0 Then MessageBox(OK,1,INFORMATION,"WAV returned 0","PiXCL DEBUG",Res)
GoSub Draw_Bl_Ell
GoSub South_cross
GoSub Draw_Little_Bang
GoSub Draw_Red_Eclipse
X1 = 380 Y1 = 70 X2 = 400 Y2 = 90 Terminate = 416
Red = 255 Green = 255 Blue = 255
GoSub Draw_Tiny_Bang
GoSub Draw_Little_Bang
X1 = 380 Y1 = 70 X2 = 400 Y2 = 90 Terminate = 416
Red = 255 Green = 255 Blue = 255
GoSub Draw_Tiny_Bang
WaitInput(200)
GoSub Draw_Yellow_Eclipse
WAVPlaySound("warp.wav",ASYNC,FILENAME,Res)
GoSub Satelite
GoSub Draw_White_Eclipse
GoSub Draw_White_Eclipse
GoSub DrawTitle
Test_1:
GoSub Draw_Red_Eclipse
GoSub Draw_Yellow_Eclipse
GoSub Draw_White_Eclipse
GoSub Draw_Red_Eclipse
GoSub Draw_Yellow_Eclipse
GoSub Draw_White_Eclipse
WaitInput(600)
Goto Leave
Leave_1:
FastExit = 1
Leave:
If FastExit <> 1
WAVPlaySound("missile3.wav",ASYNC,FILENAME,Res)
GoSub Draw_Mesh_Bang
GoSub Draw_Mesh_Bang_in_White
Else
End
Endif
WaitInput(1000)
{WAVPlaySound("zone.wav",SYNC,FILENAME,Res)}
GoSub Draw_Big_Bang
WaitInput(1400)
GoSub Draw_Little_Bang
X1 = 380 Y1 = 70 X2 = 400 Y2 = 90 Terminate = 416
Red = 255 Green = 255 Blue = 255
GoSub Draw_Tiny_Bang
GoSub DrawTitle
MessageBox(YESNO,2,QUESTION,"Want to see this again ?",
"PiXCL is a true programming language !",Res)
If Res = 1 Then Goto Test
End
{======================================================================}
Draw_Little_Bang:
UsePen(SOLID,1,255,255,255)
UseBrush(SOLID,255,255,224)
DrawEllipse(380,70,400,90)
UseBrush(NULL,0,0,0)
X1 = 380 Y1 = 70 X2 = 400 Y2 = 90
Red = 255 Green = 255 Blue = 255
Little_Bang_Loop_W:
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - 1 Y1 = Y1 - 1
X2 = X2 + 1 Y2 = Y2 + 1
Red = Red - 16 Green = Green - 16 Blue = Blue - 16
UsePen(SOLID,1,Red,Green,Blue)
WaitInput(1)
If X2 <= 428 Then Goto Little_Bang_Loop_W
Return
Draw_Mesh_Bang:
Flag = 0
UsePen(SOLID,1,0,0,0)
UseBrush(NULL,255,255,255)
DrawEllipse(20,20,80,80)
X1 = 19 Y1 = 19 X2 = 81 Y2 = 81
Incr = 3
Test_Loop_MB:
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - Incr Y1 = Y1 - Incr
X2 = X2 + Incr Y2 = Y2 + Incr
If X2 < 610 Then Goto Test_Loop_MB
Return
Draw_Mesh_Bang_in_White:
Flag = 0
UsePen(SOLID,1,0,0,255)
UseBrush(NULL,255,255,255)
DrawEllipse(20,20,80,80)
X1 = 19 Y1 = 19 X2 = 81 Y2 = 81
Incr = 9
Test_Loop_MBW:
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - Incr Y1 = Y1 - Incr
X2 = X2 + Incr Y2 = Y2 + Incr
If X2 < 610 Then Goto Test_Loop_MBW
Return
Return
{======================================================================}
Draw_Big_Bang:
WinGetClientRect("",cx1,cy1,cx2,cy2)
Flag = 0
UsePen(SOLID,2,255,255,255)
UseBrush(SOLID,255,255,255)
DrawEllipse(20,20,80,80)
X1 = 20 Y1 = 20 X2 = 80 Y2 = 80
Red = 255 Green = 255 Blue = 255
DecR = 1 DecG = 1 DecB = 1
Incr = 2
Test_Loop_BB:
If GoFast <> 1 Then WaitInput(1)
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - Incr Y1 = Y1 - Incr
X2 = X2 + Incr Y2 = Y2 + Incr
J = X2 % 25
If J = 0 Then WaitInput(1)
If X2 <= 376
If X2 = 92 Then UseBrush(NULL,255,255,255) DecR = 2 DecG = 2 DecB = 2
Red = Red - DecR | Green = Green - DecG | Blue = Blue - DecB
If Red < 0 Then Red = 0
If Green < 0 Then Green = 0
If Blue < 0 Then Blue = 0
UsePen(SOLID,2,Red,Green,Blue)
If X2 = 304 Then DecR = -16 | DecG = -16 | DecB = -16
If X2 = 318 Then DecR = 8 | DecG = 8 | DecB = 8
If X2 = 376 Then DecR = 0 | DecG = 0 | DecB = 0
GoSub South_cross
Endif
If X2 = 380 Then UsePen(SOLID,4,Red,Green,Blue) Incr = 4
If X2 = 400 Then UsePen(SOLID,5,Red,Green,Blue) Incr = 5
If X2 = 430 Then UsePen(SOLID,7,Red,Green,Blue) Incr = 7
If X2 = 479 Then UsePen(SOLID,9,Red,Green,Blue) Incr = 9
If X2 < 610 Then Goto Test_Loop_BB
Return
{======================================================================}
Draw_Tiny_Bang:
UsePen(SOLID,1,255,255,255)
UseBrush(SOLID,255,255,0)
UseBrush(NULL,0,0,0)
Tiny_Bang_Loop_W:
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - 1 Y1 = Y1 - 1
X2 = X2 + 1 Y2 = Y2 + 1
Red = Red - 16 Green = Green - 16 Blue = Blue - 16
UsePen(SOLID,1,Red,Green,Blue)
W = X2 % 5
If W = 0
If GoFast <> 1 Then WaitInput(1)
Endif
If X2 <= Terminate Then Goto Tiny_Bang_Loop_W
Return
{======================================================================}
Draw_Yellow_Eclipse:
UsePen(SOLID,1,255,255,0)
UseBrush(SOLID,0,0,0)
DrawEllipse(20,20,80,80)
UseBrush(NULL,0,0,0)
X1 = 20 Y1 = 20 X2 = 80 Y2 = 80
Red = 255 Green = 255
Test_Loop_Y:
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - 1 Y1 = Y1 - 1
X2 = X2 + 1 Y2 = Y2 + 1
Red = Red - 5 Green = Green - 5
UsePen(SOLID,1,Red,Green,0)
W = X2 % 5
If W = 0 Then WaitInput(1)
If X2 < 125 Then Goto Test_Loop_Y
Return
{======================================================================}
Draw_White_Eclipse:
UsePen(SOLID,1,255,255,255)
UseBrush(SOLID,0,0,0)
DrawEllipse(20,20,80,80)
UseBrush(NULL,0,0,0)
X1 = 20 Y1 = 20 X2 = 80 Y2 = 80
Red = 255 Green = 255 Blue = 255
Test_Loop_W:
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - 1 Y1 = Y1 - 1
X2 = X2 + 1 Y2 = Y2 + 1
Red = Red - 5 Green = Green - 5 Blue = Blue - 5
UsePen(SOLID,1,Red,Green,Blue)
W = X2 % 5
If W = 0 Then WaitInput(1)
If X2 < 125 Then Goto Test_Loop_W
Return
{======================================================================}
Draw_Red_Eclipse:
UsePen(SOLID,1,255,0,0)
UseBrush(SOLID,0,0,0)
DrawEllipse(20,20,80,80)
UseBrush(NULL,0,0,0)
X1 = 20 Y1 = 20 X2 = 80 Y2 = 80
Red = 255 Green = 255 Blue = 255
Test_Loop_R:
DrawEllipse(X1,Y1,X2,Y2)
X1 = X1 - 1 Y1 = Y1 - 1
X2 = X2 + 1 Y2 = Y2 + 1
Red = Red - 5
UsePen(SOLID,1,Red,0,0)
W = X2 % 5
If W = 0 Then WaitInput(1)
If X2 < 125 Then Goto Test_Loop_R
Return
{======================================================================}
Draw_Bl_Ell:
X1 = -200 Y1 = 170
X2 = 700 Y2 = 560
Blue = 255
UsePen(SOLID,1,0,96,Blue)
UseBrush(SOLID,0,96,Blue)
DrawEllipse(-200,170,700,560)
UseBrush(NULL,0,0,Blue)
UsePen(SOLID,1,0,0,Blue)
StartLoop_0:
Blue = Blue - 4
UsePen(SOLID,1,0,0,Blue)
X1 = X1 - 1 Y1 = Y1 - 1
X2 = X2 + 1 Y2 = Y2 + 1
DrawEllipse(X1,Y1,X2,Y2)
If Y2 < 619 Then Goto StartLoop_0
EndLoop_0:
GoSub South_cross
Return
DrawTitle:
UseFont("Arial",31,69,BOLD,ITALIC,NOUNDERLINE,255,0,0)
DrawText(193,33,"PiXCL 5.0")
DrawText(192,32,"PiXCL 5.0")
DrawText(191,31,"PiXCL 5.0")
UseFont("Arial",31,69,BOLD,ITALIC,NOUNDERLINE,255,255,0)
DrawText(190,30,"PiXCL 5.0")
UseFont("Arial",13,19,BOLD,ITALIC,NOUNDERLINE,255,0,0)
DrawText(131,121,"The Imaging Application")
DrawText(191,141,"Development Toolkit")
UseFont("Arial",13,19,BOLD,ITALIC,NOUNDERLINE,255,255,0)
DrawText(130,120,"The Imaging Application")
DrawText(190,140,"Development Toolkit")
UseFont("Arial",9,15,BOLD,ITALIC,NOUNDERLINE,255,255,255)
DrawText(200,170,"for Windows NT4/2000")
DrawText(200,185,"and Windows 95/98")
Return
DrawTitleLite:
UseFont("Arial",31,69,BOLD,ITALIC,NOUNDERLINE,128,0,0)
DrawText(193,33,"PiXCL 5.0")
DrawText(192,32,"PiXCL 5.0")
DrawText(191,31,"PiXCL 5.0")
UseFont("Arial",31,69,BOLD,ITALIC,NOUNDERLINE,128,128,0)
DrawText(190,30,"PiXCL 5.0")
UseFont("Arial",13,19,BOLD,ITALIC,NOUNDERLINE,128,0,0)
DrawText(131,121,"The Imaging Application")
DrawText(191,141,"Development Toolkit")
UseFont("Arial",13,19,BOLD,ITALIC,NOUNDERLINE,128,128,0)
DrawText(130,120,"The Imaging Application")
DrawText(190,140,"Development Toolkit")
UseFont("Arial",9,15,BOLD,ITALIC,NOUNDERLINE,128,128,128)
DrawText(200,170,"for Windows NT 4.0")
DrawText(220,185,"and Windows 95/98")
Return
{====================================================}
South_cross:
UseFont("WingDings",11,17,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(115,80,"¼")
DrawText(210,9,"¼")
UseFont("WingDings",11,17,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(154,7,"¼")
UseFont("WingDings",9,13,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(204,58,"¼")
UseFont("WingDings",9,13,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(166,42,"¼")
UseFont("Arial",3,9,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(370,7,".")
UseFont("WingDings",5,9,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(106,42,"¼")
UseFont("WingDings",3,7,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(286,38,"¼")
UseFont("WingDings",5,9,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(310,23,"¼")
UseFont("Arial",3,9,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(198,56,".")
UseFont("Arial",3,9,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(243,76,".")
DrawText(145,42,".")
UseFont("Arial",7,13,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawText(178,16,".")
DrawText(145,32,".")
DrawText(188,16,".")
Return
{====================================================}
Satelite:
UsePen(SOLID,1,255,255,255)
Abc = 14 Ord = 2
XC = 400 YC = 80 St = 1
Gray = 255
UseBrush(SOLID,255,Gray,Gray)
UsePen(SOLID,1,255,Gray,Gray)
Dec: XC = XC - Abc
YC = YC + Ord
St = St + 1
XC_ = XC + St YC_ = YC + St
DrawEllipse(XC,YC,XC_,YC_)
If YC > 80 Then Set Gray = Gray - 6
If YC > 120 Then Set Gray = Gray - 6
UsePen(SOLID,1,255,Gray,Gray)
UseBrush(SOLID,255,Gray,Gray)
If YC > 40 Then Goto Trail
UsePen(SOLID,0,0,0,0)
UseBrush(SOLID,0,0,0)
DrawEllipse(XC,YC,XC_,YC_)
Goto Chck
Trail:
XCB = XC - 1 YCB = YC - 1
XCB_ = XC_ - 1 YCB_ = YC_ - 1
If GoFast <> 1 Then WaitInput(100)
DrawEllipse(XCB,YCB,XCB_,YCB_)
Chck: If YC < 200 Then Goto Dec
Return